package com.videoconferencia.mgdbeans;

import java.util.List;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;

import com.videconference.entity.MdlVideoconferenciacfg;
import com.videconferencia.eao.ConfigurationEAOLocal;

@ManagedBean(name="configMgd")
public class ConfigurationMgdBean {
	
	@EJB ConfigurationEAOLocal configurationEao;
	
	private String host;
	private String port;
	
	private List<Object> allRecords;
	
	public ConfigurationMgdBean(){
		
	}

	public String getPort() {
		return port;
	}

	public void setPort(String port) {
		this.port = port;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}
	
	public void submit(){
		configurationEao.saveConfiguration(this.host, this.port);
		this.port = "";
		this.host = "";
	}

	public List<MdlVideoconferenciacfg> getAllRecords() {
		return configurationEao.getAllRecords();
	}

}
